package spring.ai_chat.ollama.chatApi.pojo;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.datatype.jsr310.deser.InstantDeserializer;
import lombok.Data;

import java.time.Instant;
import java.util.Date;

/**
 * {model=phi3.5:3.8b, created_at=2025-10-25T15:03:06.2855677Z,
 * message={role=assistant, content=Hello! I am Phi, an AI designed to assist with questions and tasks. How can I help you today? If "qqq" is shorthand for something specific or if there's more context you could provide, please let me know so that I may offer the most relevant assistance.}
 * ,done_reason=stop, done=true, total_duration=782564200, load_duration=7258000, prompt_eval_count=22,
 * prompt_eval_duration=3188700, eval_count=63, eval_duration=771470000}
 */
@Data
public class AiResponse {
    private String model;

    @JsonProperty("created_at")
    private String createdAt;

    private ChatMessage message;

    @JsonProperty("done_reason")
    private String doneReason;

    private boolean done;

    @JsonProperty("total_duration")
    private long totalDuration;

    @JsonProperty("load_duration")
    private long loadDuration;

    @JsonProperty("prompt_eval_count")
    private int promptEvalCount;

    @JsonProperty("prompt_eval_duration")
    private long promptEvalDuration;

    @JsonProperty("eval_count")
    private int evalCount;

    @JsonProperty("eval_duration")
    private long evalDuration;
}
